# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=py3-gtts
pkgver=2.2.3
pkgrel=1
pkgdesc="A Python library and CLI tool to interface with Google Translate text-to-speech API"
url="https://github.com/pndurette/gTTS"
arch="noarch"
license="MIT"
depends="
	py3-beautifulsoup4
	py3-click
	py3-gtts-token
	python3
	"
makedepends="py3-setuptools"
checkdepends="
	py3-mock
	py3-pytest
	py3-testfixtures
	"
source="https://pypi.python.org/packages/source/g/gTTS/gTTS-$pkgver.tar.gz"
# Net required for tests
options="net"
builddir="$srcdir/gTTS-$pkgver"

build() {
	python3 setup.py build
}

check() {
	# Tests fail currently https://github.com/pndurette/gTTS/issues/220
	pytest -k 'not test_file_ascii and not test_file_utf8'
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
13f17c572bd9691cb15c8cb157f2f3b80e50dc11f596a268eccd59ba083dda3552b97238ed6206a08d1437316b7674ac16a0a8aa66e8a65c7dd62388ce716c77  gTTS-2.2.3.tar.gz
"
